﻿@{
    ViewBag.Title = "ВГИИК - Ректорат";
    Layout = "~/Views/Shared/_Layout.cshtml";
}

<div class="presentation">
    <div class="row">
        <div class="col-xs-6 col-md-2 text-center">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="16">
                <img src="/Content/images/people/kruchek/4_1.jpg" alt="">
            </a>
            Крючек В.К.
        </div>
        <div class="col-xs-6 col-md-2 text-center">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="17">
                <img src="/Content/images/people/17/foto/11-1-1.jpg" alt="">
            </a>
            Веденеев А.Г.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="18">
                <img src="/Content/images/people/18/foto/11-1-2.jpg" alt="">
            </a>
            Гущина Е.А.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="19">
                <img src="/Content/images/people/19/foto/11-1-3.jpg" alt="">
            </a>
            Горбунов А.И.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="20">
                <img src="/Content/images/people/20/foto/11-1-4.jpg" alt="">
            </a>
            Пронникова Е.В.
        </div>

    </div>

    <div class="row">
        <div class="col-xs-6 col-md-2 text-center">
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="21">
                <img src="/Content/images/people/21/foto/11-1-6.jpg" alt="">
            </a>
            Юлпатова Е.Ю.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="22">
                <img src="/Content/images/people/22/foto/11-2-1.jpg" alt="">
            </a>
            Колесова Г.Ю.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="23">
                <img src="/Content/images/people/23/foto/11-2-2.jpg" alt="">
            </a>
            Половинко С.Н.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="13">
                <img src="/Content/images/people/13/foto/11-2-3.jpg" alt="">
            </a>
            Ленков Н.Н.
        </div>
        <div class="col-xs-6 col-md-2">
            <a href="#" data-toggle="modal" data-target="#myModal" class="thumbnail" data-personid="24">
                <img src="/Content/images/people/24/foto/11-2-5.jpg" alt="">
            </a>
            Тинина З.П.
        </div>
    </div>
</div>

<!-- Modal -->
<div class="modal fade" id="myModal" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
    <div class="modal-dialog">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal"><span aria-hidden="true">&times;</span><span class="sr-only">Close</span></button>
                <h4 class="modal-title" id="myModalLabel"></h4>
            </div>
            <div class="modal-body" id="modalBody">
                
            </div>
            <div class="modal-footer">
                <button type="button" class="btn btn-default" data-dismiss="modal">
                    Закрыть</button>
            </div>
        </div>
    </div>
</div>


<script>
    $('#myModal').on('show.bs.modal', function (event) {
        var button = $(event.relatedTarget); // Button that triggered the modal
        var personid = button.data('personid'); // Extract info from data-* attributes

        
        $.ajax({
          url:"/Archive/Person?personId=" + personid,
//              "@Url.Action("Person", "Archive", new { personId = 3 })",
          cache: false
        })
        .done(function (html) {
          $("#modalBody").html(html);
        });;



        // If necessary, you could initiate an AJAX request here (and then do the updating in a callback).
        // Update the modal's content. We'll use jQuery here, but you could use a data binding library or other methods instead.
//        var modal = $(this);
//        modal.find('.modal-title').text('New message to ' + recipient);
//        modal.find('.modal-body').val(recipient);
    })

</script>